/*
 * @Author: 260156 260156@gree.com.cn
 * @Date: 2022-08-11 16:19:54
 * @LastEditors: 260156 260156@gree.com.cn
 * @LastEditTime: 2022-08-15 09:23:19
 * @FilePath: \gree-zst-web\src\views\manage\user\types.ts
 * @Description: 用户管理-type
 *
 * Copyright (c) 2022 by 260156 260156@gree.com.cn, All Rights Reserved.
 */
import { UserListItem, OrganizationId } from "api/manage/model/manage";

export type TableItem = UserListItem;

// id? empName mailNum empNum deptId(null) roleId
export type EditForm = Omit<
  TableItem,
  "id" | "roleNameList" | "updateTime" | "updater" | "deptId" | "roleIds"
> &
  Partial<Pick<TableItem, "id">> & {
    deptId: OrganizationId | null;
    roleId: number | null;
  };

// id roleIds deptId
export type UpdateParams = Pick<
  TableItem,
  "id" | "roleIds" | "deptId" | "empName"
>;

// empName mailNum empNum roleIds
export type AddParams = Pick<
  TableItem,
  "empName" | "mailNum" | "empNum" | "roleIds"
>;
